package com.ksvip.next.components.redis.lock;

import java.util.concurrent.Semaphore;

public class LockManager {
    private LockService lockService;

    //私有化构造函数
    public LockManager(LockService lockService) {
        this.lockService = lockService;
    }

    public boolean tryLock(final String lockKey, final String value, final int expireTime) {
        return this.lockService.tryLock(lockKey, value, expireTime);

    }

    public boolean releaseLock(final String lockKey, final String value) {
        return this.lockService.releaseLock(lockKey, value);
    }
}
